#include<iostream>
#include<cstring>
using namespace std;
const int N =21;
int a[N][N];
int main()
{
	int n,i,j;
	cin>>n;
	for(i=0;i<n;i++)
	{
		for(j=0;j<=i;j++)
		{
		  if(j==0||j==i)
		  {
		  	a[i][j]=1;
		    cout<<a[i][j]<<' ';
		  }
		  else
		  {
		    a[i][j]=a[i-1][j-1]+a[i-1][j];
		    cout<<a[i][j]<<' ';
	      }
	    }
	    cout<<endl;
	}
	return 0;
}
	
